package edu.ycu.aladdin.web.api.crawler;

import edu.ycu.aladdin.web.common.RestResponse;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.io.IOException;

/**
 * @author <a href="mailto:wangruihuano@gmail.com">王瑞环</a>
 * @since 2019-04-02 14:33
 */
public interface WeiBoUserInfoAPI {

    @RequestMapping(value = "/user", method = RequestMethod.POST)
    RestResponse addUser(@RequestParam("uid") Long uid, @RequestParam("cover") boolean cover) throws IOException;

    @RequestMapping(value = "/user", method = RequestMethod.DELETE)
    RestResponse del(@RequestParam("uid") Long uid);

    @RequestMapping(value = "/user", method = RequestMethod.GET)
    RestResponse getUserInfo(@RequestParam("uid") Long uid);

    @RequestMapping(value = "/users", method = RequestMethod.GET)
    RestResponse getUserInfos(@RequestParam("page") long page, @RequestParam("num") int num);
}
